﻿<div id="body">
<?php
	$username=$_SESSION['username'];
	$select_user=mysql_query('SELECT * FROM users WHERE username="'.$username.'"');
	$row_user=mysql_fetch_assoc($select_user);
	if(mysql_num_rows($select_avatar)==1){
			  $img="<img src='../user_pics/".$row_avatar[pic_name]."' width='200' height='200' style='margin-left: 10px; box-shadow: 5px 5px 5px #000' alt='avatar'/>";
    }
	else{
	      $img="<img src='../user_pics/default.png' width='200' height='200' style='margin-left: 10px; box-shadow: 5px 5px 5px #000' alt='avatar'/>";
	}
	echo '<p style="float: left;">'.$img.'</p>';
	echo '<p style="position: relative; right: -20px;">Потребителско име: <b>'.$row_user['username'].'</b></p>';
	echo '<p style="position: relative; right: -20px;">E-Mail: <b>'.$row_user['email'].'</b></p>';
	echo "<br /><hr />";
	echo '<p style="position: relative; right: -20px; bottom: -20px;">Име: <b>';
	
	echo $row_user['first_name'];
	echo '</b></p>';
	echo '<p style="position: relative; right: -20px; bottom: -20px;">Фамилия: <b>';
	echo $row_user['family'];
	echo '</b></p>';
	
		if($row_user['type']==1) $row_user['type']="Потребител";
		elseif($row_user['type']==2) $row_user['type']="Модератор";
		elseif($row_user['type']==3) $row_user['type']="Администратор";
	
	echo '<p style="position: relative; right: -20px; bottom: -20px;">Ранг: <b>'.$row_user['type'].'</b></p>';
?>
</div>